home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Incognito / cdev / CControlPanel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  1.0 KB  |  58 lines  |  [TEXT/MPS ]

  1. #ifndef __CCONTROLPANEL__
  2. #define __CCONTROLPANEL__
  3. #pragma once
  4.  
  5. #ifndef __CLISTMANAGER__
  6. #include "CListManager.h"
  7. #endif
  8.  
  9. #ifndef __EVENTS__
  10. #include <Events.h>
  11. #endif
  12.  
  13. #ifndef __DIALOGS__
  14. #include <Dialogs.h>
  15. #endif
  16.  
  17. class CControlPanel : public SingleObject
  18. {
  19.     public:
  20.     
  21.                 CControlPanel(short numItems);
  22.                 ~CControlPanel();
  23.         
  24.         void    SetArguments(short item, EventRecord *theEvent, DialogPtr theDialog);
  25.         long    DispatchMessage(short theMessage);
  26.  
  27.     protected:
  28.         enum        // dialog items
  29.         {
  30.             kAddButton = 1,
  31.             kListBox,
  32.             kRemoveButton,
  33.             kPrefsName = 0,
  34.             kChooseDialog = -4033
  35.         };
  36.         
  37.         long    DoInit();
  38.         long    DoHit();
  39.         long    DoClose();
  40.         long    DoUpdate();
  41.         long    DoActivate();
  42.         long    DoDeactivate();
  43.         long    DoKey();
  44.         
  45.         long    ReadPreferencesIntoList();
  46.         void    InsertItems();
  47.         void    SetupDialog();
  48.         void    SavePreferences();
  49.         void    RemovePreferences();
  50.         
  51.         CListManager    *fTheList;        // the list of items 2 b masked
  52.         EventRecord        *fTheEvent;
  53.         DialogPtr        fTheDialog;
  54.         short            fItemHit;
  55.         short            fNumItems;
  56. };
  57.  
  58. #endif